home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / man / cat3 / XmTextFieldGetSubstring.z / XmTextFieldGetSubstring
Encoding:
Text File  |  2003-11-18  |  5.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg((((3333XXXX))))UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVVXXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       _X_m_T_e_x_t_F_i_e_l_d_G_e_t_S_u_b_s_t_r_i_n_g - A TextField    function that
  10.       retrieves a copy of a    portion    of the internal    text buffer
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.       #include <Xm/TextF.h>
  14.  
  15.       int XmTextFieldGetSubstring (wwwwiiiiddddggggeeeetttt,,,, ssssttttaaaarrrrtttt,,,, nnnnuuuummmm____cccchhhhaaaarrrrssss,,,, bbbbuuuuffffffffeeeerrrr____ssssiiiizzzzeeee,,,, bbbbuuuuffffffffeeeerrrr)
  16.            _W_i_d_g_e_t       wwwwiiiiddddggggeeeetttt;
  17.            _X_m_T_e_x_t_P_o_s_i_t_i_o_nssssttttaaaarrrrtttt;
  18.            _i_n_t       nnnnuuuummmm____cccchhhhaaaarrrrssss;
  19.            _i_n_t       bbbbuuuuffffffffeeeerrrr____ssssiiiizzzzeeee;
  20.            _c_h_a_r       *bbbbuuuuffffffffeeeerrrr;
  21.  
  22.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.       _X_m_T_e_x_t_F_i_e_l_d_G_e_t_S_u_b_s_t_r_i_n_g retrieves a copy of a    portion    of the
  24.       internal text    buffer of a TextField widget.  The function
  25.       copies a specified number of characters from a given start
  26.       position in the internal text    buffer into a buffer provided
  27.       by the application.  A NULL terminator is placed at the end
  28.       of the copied    data.
  29.  
  30.       The size of the required buffer depends on the maximum
  31.       number of bytes per character    (_M_B__C_U_R__M_A_X) for the current
  32.       locale.  _M_B__C_U_R__M_A_X is a macro defined in ssssttttddddlllliiiibbbb....hhhh.  The
  33.       buffer should    be large enough    to contain the substring to be
  34.       copied and a NULL terminator.     Use the following equation to
  35.       calculate the    size of    buffer the application should provide:
  36.  
  37.       bbbbuuuuffffffffeeeerrrr____ssssiiiizzzzeeee =    (nnnnuuuummmm____cccchhhhaaaarrrrssss * _M_B__C_U_R__M_A_X) + 1
  38.  
  39.       wwwwiiiiddddggggeeeetttt
  40.            Specifies the TextField widget ID.
  41.  
  42.       ssssttttaaaarrrrtttt
  43.            Specifies the beginning character position from which
  44.            the data    will be    retrieved.  This is an integer number
  45.            of characters from the beginning    of the text buffer.
  46.            The first character position is 0.
  47.  
  48.       nnnnuuuummmm____cccchhhhaaaarrrrssss
  49.            Specifies the number of characters to be    copied into
  50.            the provided buffer.
  51.  
  52.       bbbbuuuuffffffffeeeerrrr____ssssiiiizzzzeeee
  53.            Specifies the size of the supplied buffer in bytes.
  54.            This size should    account    for a NULL terminator.
  55.  
  56.       bbbbuuuuffffffffeeeerrrr
  57.            Specifies the character buffer into which the internal
  58.            text buffer will    be copied.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 11/11/03)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg((((3333XXXX))))UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVVXXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg((((3333XXXX))))
  71.  
  72.  
  73.  
  74.       For a    complete definition of TextField and its associated
  75.       resources, see _X_m_T_e_x_t_F_i_e_l_d(_3_X).
  76.  
  77.      RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  78.       _X_m_C_O_P_Y__S_U_C_C_E_E_D_E_D
  79.            The function was    successful.
  80.  
  81.       _X_m_C_O_P_Y__F_A_I_L_E_D
  82.            The function failed because it was unable to copy the
  83.            specified number    of characters into the buffer
  84.            provided.  The buffer size may be insufficient.    The
  85.            contents    of bbbbuuuuffffffffeeeerrrr are undefined.
  86.  
  87.       _X_m_C_O_P_Y__T_R_U_N_C_A_T_E_D
  88.            The requested number of characters extended beyond the
  89.            internal    buffer.     The function copied characters
  90.            between ssssttttaaaarrrrtttt and the end of the    widget's buffer    and
  91.            terminated the string with a NULL terminator; fewer
  92.            than nnnnuuuummmm____cccchhhhaaaarrrrssss characters were copied.
  93.  
  94.      RRRREEEELLLLAAAATTTTEEEEDDDD IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  95.       _X_m_T_e_x_t_F_i_e_l_d(_3_X) and _X_m_T_e_x_t_F_i_e_l_d_G_e_t_S_u_b_s_t_r_i_n_g_W_c_s(_3_X).
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 11/11/03)
  130.  
  131.  
  132.  
  133.